#!/bin/sh
yum install python3-devel
pip install pyinstaller -i http://dev.cmri.cn/nexus/repository/pypi/simple/ --trusted-host dev.cmri.cn
pip install ssh2-python -i http://dev.cmri.cn/nexus/repository/pypi/simple/ --trusted-host dev.cmri.cn
pip install pyproject -i http://dev.cmri.cn/nexus/repository/pypi/simple/ --trusted-host dev.cmri.cn
pip3 install gevent -i http://dev.cmri.cn/nexus/repository/pypi/simple/ --trusted-host dev.cmri.cn
pip install pyyaml -i http://dev.cmri.cn/nexus/repository/pypi/simple/ --trusted-host dev.cmri.cn

rm -rf dist/ build/ paralleldump.spec

pyinstaller -D --hidden-import=yaml --hidden-import=ssh2.agent --hidden-import=ssh2.pkey --hidden-import=ssh2.channel  --hidden-import=ssh2.sftp_handle --hidden-import=ssh2.listener --hidden-import=ssh2.statinfo  --hidden-import=ssh2.fileinfo --hidden-import=ssh2.publickey --hidden-import=ssh2.knownhost --hidden-import=gevent --add-data "lib:lib" --add-data "config.yaml:." paralleldump.py
